home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hunter 2006
/
Hunter 2006.iso
/
soft
/
sleipnir241.exe
/
{app}
/
scripts
/
$AdvancedPageSearchBar
/
show_links_output.js
< prev
Wrap
Text File
|
2002-11-06
|
3KB
|
104 lines
//âèâôâNé╡é─éóéΘâyü[âWé╠URLé≡âAâEâgâvâbâgé╔ò\Īé╖éΘ
//by sim
//2002-09-21:ì∞ɼ
//2002-11-06:âLü[é╔ë₧é╢é─ÆèÅoé╖éΘègÆúÄqé≡ò╧ìXé┼é½éΘéµéñÅCÉ│
var pnir = new ActiveXObject("Sleipnir.API");
if (pnir.GetCount() == 0) {
pnir = null;
WScript.Quit();
}
//ëƒé│éΩé─éóéΘâLü[é⌐éτüAÆèÅoé╔Ägùpé╖éΘÉ│ïKò\î╗é≡îêÆΦüié▄é╜é═É▌ÆΦüjé╖éΘ
var re;
if ((pnir.ShiftDown && pnir.CtrlDown) == true) {
//É▌ÆΦ
setGroup(pnir);
pnir = null;
WScript.Quit();
}
else if (pnir.ShiftDown == true) {
re = getGroup(pnir, 1);
}
else if (pnir.CtrlDown == true) {
re = getGroup(pnir, 2);
}
else {
re = getGroup(pnir, 0);
}
//âAâNâeâBâué╚â^âué╠documentâIâuâWâFâNâgé⌐éτaùvæfé╠ÅWìçé≡ö▓é½Åoé╖
var tabId = pnir.GetDocumentID(pnir.ActiveIndex);
var doc = pnir.GetDocumentObject(tabId);
//Sleipniré╠â^âué╔ò\Īé│éΩéΘâ^âCâgâïé═Éeâtâîü[âÇé╠titleé╛é⌐éτé▒é▒é┼ĵô╛
var title = doc.title;
try {
while (doc.activeElement.tagName.match(/frame/i) != null) {
doc = doc.activeElement.contentWindow.document;
}
}
catch (e) {
pnir.MessageBox("âAâNâeâBâué╚documentâIâuâWâFâNâgé≡ĵô╛é┼é½é▄é╣é±é┼é╡é╜üB\n" + e);
doc = null;
pnir = null;
WScript.Quit();
}
var anchors = new Enumerator(doc.body.getElementsByTagName("a"));
//âAâEâgâvâbâgâoü[é≡âNâèâAé╡é─é⌐éτURLé≡ò\Ī
pnir.OutputClear();
pnir.OutputVisible = true;
pnir.OutputScript = "$OnDoubleClick\\for_show_links.js";
//â_âuâïâNâèâbâNÄ₧é╠é╜é▀é╔üAURLé┼é╚éóìsé═#é┼Äné▄éΘéµéñé╔é╖éΘ
pnir.OutputAddString("#" + title + " é¬âèâôâNé╡é─éóéΘâyü[âWé╠URL");
for (; !anchors.atEnd(); anchors.moveNext()) {
if ((anchors.item().href != null)
&& (anchors.item().href.match(re) != null)) {
pnir.OutputAddString(anchors.item().href);
}
}
pnir.OutputAddString("#ÅIù╣é╡é▄é╡é╜===================");
doc = null;
pnir = null;
//Shift+Ctrlé¬ëƒé│éΩé─éóé╜ÅΩìçé═É▌ÆΦ
function setGroup(pnir) {
var extGroup = new Array(3);
var result;
pnir.MessageBox("âAâEâgâvâbâgé╔URLÆèÅoâXâNâèâvâgé╠É▌ÆΦé≡ìséóé▄é╖üB\në╜éαëƒé│é╚éóé┼Ä└ìsüAShifté≡ëƒé╡é─Ä└ìsüACtrlé≡ëƒé╡é─Ä└ìsé╠Åçé╔\nôⁿù═â_âCâAâìâOé¬ò\Īé│éΩéΘé╠é┼üAé╗éΩé╝éΩé╔ÆèÅoé╖éΘègÆúÄqé≡ôⁿù═é╡é─é¡é╛é│éóüB\n\nòíÉöé╠ègÆúÄqé≡ôⁿù═é╖éΘÅΩìçé═\"jpg|png\"é╠éµéñé╔\"|\"é┼ègÆúÄqé≡ïµÉ╪é┴é─ôⁿù═é╡é─é¡é╛é│éóüB\né▄é╜üA\"?\"é┼é╗é╠ôsôxôⁿù═üA\"\"üiôⁿù═é╡é╚éóé┼OKüjé┼æSÆèÅoé╔é╚éΦé▄é╖üB");
var groupTitle = new Array(
"ë╜éαëƒé│é╚éóé┼", "ShiftâLü[é≡ëƒé╡é─", "CtrlâLü[é≡ëƒé╡é─"
);
var i;
for (i = 0; i < 3; i++) {
extGroup[i] = pnir.GetProfileString("OutputExtractUrl", "Group_" + i, "");
result = pnir.InputBox(groupTitle[i] + "Ä└ìsé╠é╞é½é╠ègÆúÄqé≡ôⁿù═é╡é─é¡é╛é│éóüB", extGroup[i]);
if (pnir.Result == 1) {
pnir.WriteProfileString("OutputExtractUrl", "Group_" + i, result);
}
}
}
//Script.inié╔ò█æ╢é╡é╜É▌ÆΦé⌐éτüAÆèÅoùpÉ│ïKò\î╗âIâuâWâFâNâgé≡ò╘é╖
//number : é╟é╠É▌ÆΦé≡ĵéΦÅoé╖é⌐üB0=ë╜éαëƒé│é╚éó, 1=Shift, 2=Ctrl
function getGroup(Sleipnir, number) {
var pattern = Sleipnir.GetProfileString("OutputExtractUrl", "Group_" + number, "?");
var result
if (pattern.length == 0) {
pattern = ".*";
}
while (pattern.indexOf("?") == 0) {
result = Sleipnir.InputBox("ègÆúÄqé≡ôⁿù═é╡é─é¡é╛é│éóüB", "");
if (Sleipnir.Result == 1) {
pattern = result;
}
}
var re = new RegExp(".*\\.(" + pattern + ")$", "i");
re.compile(".*\\.(" + pattern + ")$", "i");
return re;
}